﻿using System.Collections.Generic;
using MediaBrowser.Entities;

namespace MediaBrowser.IServices
{
    public interface IMediaManager
    {
        /// <summary>
        /// Retourne la Liste des média
        /// </summary>
        /// <returns></returns>
        IEnumerable<Media> ListMediasByCategory(int idCategory);

        /// <summary>
        /// Modification d'un média
        /// </summary>
        /// <param name="media"></param>
        /// <returns></returns>
        bool UpdateMedia(Media media);

        /// <summary>
        /// Création d'une Image
        /// </summary>
        /// <param name="fileName"></param>
        /// <returns></returns>
        Media CreatePicture(string fileName);

        /// <summary>
        /// Suppresion d'une Image
        /// </summary>
        /// <param name="m"></param>
        void DeletePicture(Media m);

        /// <summary>
        /// Sauvegarder un Film
        /// </summary>
        /// <param name="newMedia"></param>
        /// <param name="previousMedia"></param>
        Media SaveMovie(Media newMedia, Media previousMedia);

        /// <summary>
        /// Suppression d'un Film
        /// </summary>
        /// <param name="m"></param>
        void DeleteMovie(Media m);

        /// <summary>
        /// Sauvegarder un Livre
        /// </summary>
        /// <param name="newMedia"></param>
        /// <param name="previousMedia"></param>
        Media SaveBook(Media newMedia, Media previousMedia);

        /// <summary>
        /// Suppression d'un Livre
        /// </summary>
        /// <param name="m"></param>
        void DeleteBook(Media m);

        /// <summary>
        /// Sauvegarder un album
        /// </summary>
        /// <param name="newMedia"></param>
        /// <param name="oldMedia"></param>
        Media SaveAlbum(Media newMedia, Media oldMedia);

        /// <summary>
        /// Suppression d'un album
        /// </summary>
        /// <param name="m"></param>
        void DeleteAlbum(Media m);

        /// <summary>
        /// Création d'une nouvelle Musique
        /// </summary>
        /// <param name="idMedia"></param>
        /// <param name="fileName"></param>
        /// <returns></returns>
        MediaItem CreateMusic(int idMedia, string fileName);

        /// <summary>
        /// Suppression d'une Musique
        /// </summary>
        /// <param name="idMedia"></param>
        /// <param name="m"></param>
        void DeleteMusic(int idMedia, MediaItem m);


    }
}
